package de.slothsoft.wasbinich.android.database.webservice;

import de.slothsoft.wasbinich.core.database.ApplicationBean;
import de.slothsoft.wasbinich.core.database.Database;
import de.slothsoft.wasbinich.core.database.LoginBean;
import de.slothsoft.wasbinich.core.database.ManagerBean;
import de.slothsoft.wasbinich.core.database.PictureBean;
import de.slothsoft.wasbinich.core.database.webservice.RestCommunicator;
import de.slothsoft.wasbinich.core.database.webservice.WebserviceManagerBean;
import de.slothsoft.wasbinich.core.database.webservice.WebservicePictureBean;

public class WebserviceDatabase extends Database {

    private final RestCommunicator restCommunicator = new AndroidRestCommunicator();

    @Override
    protected PictureBean createPictureBean() {
	return new WebservicePictureBean(this.restCommunicator);
    }

    @Override
    protected ApplicationBean createApplicationBean() {
	return new WebserviceApplicationBean(this.restCommunicator);
    }

    @Override
    protected ManagerBean createManagerBean() {
	return new WebserviceManagerBean(this.restCommunicator);
    }

    @Override
    protected LoginBean createLoginBean() {
	return new OAuth2LoginBean(this.restCommunicator);
    }

}
